import type { LoginRequestData } from '@/types/login.d'
import { request } from '@/utils/request'

/** 用户登录 */
export function accountLogin(account: LoginRequestData) {
  return request({
    url: '/login',
    method: 'post',
    data: account
  })
}
/** 获取验证码 */
export function getCaptchaApi() {
  return request({
    url: '/captcha',
    method: 'get'
  })
}
/** 获取用户详情 */
export function getCurrentUserApi(id: number) {
  return request({
    url: '/userInfo',
    method: 'get',
    params: { id }
  })
}
